package tests;

import java.util.Scanner;

public class test20 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        while(sc.hasNextInt()){
            int a = sc.nextInt();
            long f0 = 1;
            long f1 = 1;
            long las = 1;
            for(int i = 2;i <= a;i++){
                las = f0 + f1;
                f0 = f1;
                f1 = las;
            }
            System.out.println(las);
        }
    }
}
